import Test from "./Test.vue"
import { createPinia } from 'pinia'

const HelloVueApp = {
    data() {
        return {
            message: '我是父组件'		// 在data方法的返回值中设置属性
        }
    },
    components: {
        'test': Test // 注册局部组件  
    },
    methods: {
        kk() {
            this.message += 1			//父组件获取子组件的值
        }
    }
}


// 模块化挂载根组件:
import { createApp } from 'vue'

const app = createApp(HelloVueApp)
app.component('global_c', { template: '<h1>全局组件</h1>' })

const pinia = createPinia()
app.use(pinia)

app.mount('#app')
